﻿using GenericWin;
using ModelEntities.Facade;
using ReprisePV.ViewModels;
using GeneralServices.ViewModel;

namespace ReprisePV.Views
{
    /// <summary>
    /// Logique d'interaction pour SearchPV.xaml
    /// </summary>
    public partial class SearchPV : GenericUserControl
    {
        public SearchPV()
        {
            InitializeComponent();

            SearchPV_VM vm  = ServicesSingle.Get<SearchPV_VM>() as SearchPV_VM;
            vm.UpdateNumPV += UpdateNumeroPV;
        }

        private void UpdateNumeroPV(object sender, PVEventArgs e)
        {
            this.numPV.Text = e.PV.NoPV;
            annee.SelectedIndex = 0;
        }

    }
}
